﻿using Framework.Base;
using Microsoft.AspNetCore.Authorization;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wq.Core.Extensions.Assembly.Jwt;

namespace Framework
{
    [Authorize("Manager")]
    public abstract class PlatAdminController : BaseController
    {
        /// <summary>
        /// 管理员Id
        /// </summary>
        public long CurrentManager => JWTHelper.SerializeJwt(HttpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", "")).UserId.ObjToInt(); 
    }
}
